<template>
	<view class="content">
		<nav-bars backState="1000" :bgColor="navBackground" fontColor="#000" title="我的奖品"></nav-bars>
		<!-- 顶部 -->
		<view class="main">
			<view class="state" :class="[status===1?'success':'fail']">
				<image :src="imageSrc+'/static/activity/hook.png'" v-if="status===1"></image>
				<image :src="imageSrc+'/static/activity/close.png'" v-else></image>
			</view>
			<view class="row-text">
				<text v-if="status===1">兑换成功</text>
				<text v-else>兑换失败</text>
				<text class="msg" v-if="status===1">继续兑换您的奖品吧~</text>
				<text class="msg" v-else>请重新加载兑换码或检查网络设置</text>
			</view>
		</view>
		<view class="footer">
			<view class="btn" @click="goBack">我知道了</view>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				status: 1,
				navBackground: '',
				imageSrc: this.$static,
			}
		},
		onLoad(e) {
			this.$utils.getUrl()
			//this.status = e.status
		},
		methods: {
          goBack(){
			  uni.navigateTo({
			      url: '/pages_activity/pages/lotteryDraw/receivePrize/index'
			  });
		  }
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		width: 100%;
	.main {
		.state {
			margin: 50% auto 0 auto;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 172rpx;
			height: 172rpx;
			border-radius: 50%;
			image {
				width: 80rpx;
				height: 80rpx;
			}
		}
       .success{
		   background: #E3672C;
	   }
	   .fail{
	   		   background:#DCDCDC;
	   }
		.row-text {
			margin:62rpx auto;
			text-align: center;
			text {
				font-size: 40rpx;
				display: block;
				font-weight: bold;
				color: #242424;
				line-height: 40px;
				color: #242424;
			}

			text.msg {
				font-size: 28rpx;
				font-weight: 500;
				color: #979797;
				line-height: 40rpx;
			}
		}
	}
	.footer{
		width: 100%;
		height: 100rpx;
		position: fixed;
		bottom:40rpx;
		.btn{
			width: 500rpx;
			height: 100rpx;
			margin: auto;
			background: #E3672C;
			border-radius: 50rpx;
			color: #fff;
			text-align: center;
			line-height: 100rpx;
		}
	}
	}
</style>
